//
//  DYEditColorViewController.m
//  colorTest
//
//  Created by 丁益 on 2017/7/29.
//  Copyright © 2017年 celi. All rights reserved.
//

#import "DYEditColorViewController.h"
#import "KZColorPicker.h"
#import "DYColorView.h"

@interface DYEditColorViewController ()
@property (nonatomic, weak) DYColorView *colorView;
@property (nonatomic, weak) KZColorPicker *picker;
@property(nonatomic, strong) UIColor *selectedColor;

@end

@implementation DYEditColorViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    KZColorPicker *picker = [[KZColorPicker alloc] initWithFrame: CGRectMake(0, 64, sWidth, sHeight)];
    picker.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
    picker.selectedColor = self.selectedColor;
    picker.oldColor = self.selectedColor;
    picker.isShowAlphaSlider = NO;//项目中不需要对涂明渡设置
    [picker addTarget:self action:@selector(pickerChanged:) forControlEvents:UIControlEventValueChanged];
    self.picker = picker;
    [self.view addSubview:picker];
    
    
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    
    self.hidesBottomBarWhenPushed = YES;
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    self.hidesBottomBarWhenPushed = NO;
}


- (void)pickerChanged:(KZColorPicker *)cp
{
    DLog(@"pickerChanged---");
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
@end
